﻿<UserControl x:Class="SurfaceApplication3.hotspotAdd"
             
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:my="http://schemas.microsoft.com/surface/2008"
             xmlns:m="clr-namespace:SurfaceApplication3"
             xmlns:dz="clr-namespace:DeepZoom.Controls;assembly=DeepZoom"
             mc:Ignorable="d" 

             Height="510" Width="924" Background="#B0CAB8" BorderThickness="3">

    <UserControl.Resources>
        <Style TargetType="{x:Type my:SurfaceRadioButton}" >
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type my:SurfaceRadioButton}">
                        <BulletDecorator Background="Transparent">
                            <BulletDecorator.Bullet>
                                <Canvas Width="15" Height="15">
                                    <Ellipse Fill="White" Width="15" Height="15"/>
                                    <Ellipse Fill="Purple" Width="13" Height="13" Canvas.Left="1" Canvas.Top="1"/>
                                    <Ellipse x:Name="checked" Fill="Azure" Width="11" Height="11" Canvas.Left="2" Canvas.Top="2" />
                                 
                                </Canvas>
                            </BulletDecorator.Bullet>
                        </BulletDecorator>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsChecked" Value="false">
                                <Setter TargetName="checked" Property="Visibility" Value="Collapsed"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="my:SurfaceButton" x:Key="gen">
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Background" Value="#227174"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="my:SurfaceButton">

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Background" >
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                                            <GradientStop Color="#FF90DDFF" Offset="0.35"/>
                                            <GradientStop Color="LightBlue" Offset="0.95"/>
                                            <GradientStop Color="#FF81DDFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Background" >
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                                            <GradientStop Color="DarkGray" Offset="0.35"/>

                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                        <Border CornerRadius="7" Margin="0" Background="{TemplateBinding Background}" BorderBrush="#227174" BorderThickness="2">
                            <ContentPresenter 
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                >
                            </ContentPresenter>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style TargetType="my:SurfaceButton" x:Key="browse">
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="Background" Value="#227174"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="my:SurfaceButton">

                        <ControlTemplate.Triggers>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Background" >
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                                            <GradientStop Color="#FF90DDFF" Offset="0.35"/>
                                            <GradientStop Color="LightBlue" Offset="0.95"/>
                                            <GradientStop Color="#FF81DDFF" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter Property="Background" >
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
                                            <GradientStop Color="DarkGray" Offset="0.35"/>

                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                        <Border CornerRadius="7" Margin="0" Background="{TemplateBinding Background}" BorderBrush="#227174" BorderThickness="2">
                            <ContentPresenter 
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                >
                            </ContentPresenter>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Canvas Height="510" Width="924">

        <Label Content="To add a hotspot, click 'Add Hotspot' and click the location on the artwork. Then select a type of hotspot." Height="43" Width="881" FontSize="17" Canvas.Top="6" Canvas.Left="19" Foreground="Black"/>
        
        
        <Canvas x:Name="imageCover" Canvas.Top="40" Canvas.Left="20" Height="400" Width="500" IsHitTestVisible="False" Canvas.ZIndex="20" Background="Transparent">
                
        </Canvas> 
        <Rectangle Height="400" Canvas.Top="40" Canvas.Left="20" Name="rectangle1" Stroke="#227174" Width="500" Fill="#B8DAD2" StrokeThickness="4" Canvas.ZIndex="0" />
        <dz:MultiScaleImage x:Name="image1" Height="392" Width="492" Canvas.Top="44" Canvas.Left="24"  Canvas.ZIndex="10"/>

        <Canvas Name="detailHotspot" Canvas.Top="40" Canvas.Left="540" Height="400" Width="360">
            <Rectangle Height="400" Stroke="#FF076F72"  Width="360" Fill="#FFEDF5E2" StrokeThickness="3" />

            <my:SurfaceButton Name="AddText" Style="{StaticResource browse}" Width="180" Height="40" Canvas.Top="60" Canvas.Left="30" Content="Set Hotspot to Text" Click="AddText_Click" IsEnabled="False"/>
            <my:SurfaceButton Name="AddImage" Style="{StaticResource browse}" Width="180" Height="40" Canvas.Top="130" Canvas.Left="30" Content="Set Hotspot to Image" Click="AddImage_Click" IsEnabled="False" />
            <my:SurfaceButton Name="AddAudio" Style="{StaticResource browse}" Width="180" Height="40" Canvas.Top="200" Canvas.Left="30" Content="Set Hotspot to Audio" Click="AddAudio_Click" IsEnabled="False"/>
            <my:SurfaceButton Name="AddVideo" Style="{StaticResource browse}" Width="180" Height="40" Canvas.Top="270" Canvas.Left="30" Content="Set Hotspot to Video" Click="AddVideo_Click" IsEnabled="False" />

            <my:SurfaceButton Name="Edit" Style="{StaticResource browse}" Width="90" Height="26" MinHeight="0" Canvas.Top="170" Canvas.Left="230" Content="Edit" Click="Edit_Click" IsEnabled="False" />
        </Canvas>

        <my:SurfaceButton Style="{StaticResource gen}" Content="Save and Close" Height="30" Foreground="White" Canvas.Top="458" Canvas.Right="23" Click="save_close_click" VerticalContentAlignment="Bottom" HorizontalAlignment="Center" MinHeight="0" MinWidth="0" FontSize="14" Width="122" />
        <my:SurfaceButton Style="{StaticResource gen}" Canvas.Right="162" Canvas.Top="458" Foreground="White" Content="Cancel" Height="30" Name="Cancel" Width="94" Click="Cancel_Click" VerticalAlignment="Bottom" VerticalContentAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" MinHeight="0" MinWidth="0" Margin="1" FontSize="14"/>
        <my:SurfaceButton Style="{StaticResource gen}" Canvas.Right="275" Canvas.Top="458" Foreground="White" Content="Remove One" Height="30" Name="RemoveOne" Width="105" VerticalAlignment="Bottom" VerticalContentAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" MinHeight="0" MinWidth="0" Margin="1" FontSize="14" Click="RemoveOne_Click" />
        <my:SurfaceButton Style="{StaticResource gen}" Canvas.Right="395" Canvas.Top="458"  Foreground="White" Content="Clear All Hotspots" Height="30" Name="Clear"  Width="135" VerticalAlignment="Bottom" VerticalContentAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" MinHeight="0" MinWidth="0" Margin="1" FontSize="14" Click="Clear_Click" />
        <my:SurfaceButton Style="{StaticResource gen}" Canvas.Right="545" Canvas.Top="458"  Foreground="White" Content="Add Hotspot" Height="30" Name="Enable" Width="150" VerticalAlignment="Bottom" VerticalContentAlignment="Center" HorizontalAlignment="Center" HorizontalContentAlignment="Center" MinHeight="0" MinWidth="0" Margin="1" FontSize="14" Click="Enable_Click" />
    </Canvas>
</UserControl>
